﻿#include "financetreeview.h"

FinanceTreeView::FinanceTreeView(QWidget *parent) : MyTreeView(parent)
{
    setCategoryType(Company::FinanceCategory);

    connect(this, &QTreeView::clicked,
            [=](const QModelIndex index)
    {
        Q_UNUSED(index);

        emit this->queryFinanceItem(
                    this->selectedPrimaryDirectory(),
                    this->selectedSecondaryDirectory());
    });
}

void FinanceTreeView::initCategory(QString category){
    initWithCategory(category, "财务类别#3#所有财务#0#收入#1#所有收入#0#支出#1#所有支出#0#");
}
